package q1550_threeConsecutiveOdds;

public class Solution {
    /*
    直接遍历 注意用位运算提高效率
     */
    public boolean threeConsecutiveOdds(int[] arr) {
        for (int i = 0; i < arr.length - 2; i++) {
            if ((arr[i] & 1) != 0 && (arr[i + 1] & 1) != 0 && (arr[i + 2] & 1) != 0) return true;
        }
        return false;
    }
}
